#include "user_scrrenew.h"

void screen_renew_task(void *argument)
{
	
	uint8_t keystr=0;
	//printf("\r\n screen renew task ok??? \r\n");
	while(1)
	{
		if(xQueueReceive(Key_MessageQueue, &keystr, 1) == pdTRUE)
		{
			//key1 pressed
			if(keystr == 1)
			{
				Page_Back();
				if(Page_Get_NowPage()->page_obj == &ui_MenuPage)
				{
					//HR sensor sleep
					EM7028_hrs_DisEnable();
					//sensor sleep
					LSM303DLH_Sleep();
					// SPL_Sleep();
					
				}
				else if(keystr == 2)	//key2 pressed
				{
					Page_Back_Bottom();
					//HR sensor sleep
					EM7028_hrs_DisEnable();
					//sensor sleep
					LSM303DLH_Sleep();
					// SPL_Sleep();
				}
			}
		}
		//printf("\r\n screen renew task ok?? \r\n");
		vTaskDelay(10);
	}
}






